class Person {
    name: string = "大声说"
    age: number = 50

    // 静态属性
    static V: string = '1.0.0'

    // 只读属性
    readonly type: string = '人类'

    // 构造函数
    constructor(name: string, age: number) {
        this.name = name;
        this.age = age;
    }

    /**
     * 常规方法：说话
     */
    say(): void {
        console.log(this.name + '说：你好！');
    }


    /**
     * 静态方法：敲打
     */
    static hit(): void {
        console.log(this.name + ' -> 敲打');
    }
}
